<!DOCTYPE html>
<html>
{{template "inc_bodyHead" .Title}}
<body>

{{template "inc_header" .}}

<div id="main">

    <div id="main-inner">


        <div id="redirect" class="clouds">
            <h3 class="clouds-title text-center">{{.Title}}</h3>
            <div class="text-center notice-info">
                {{.Message}} <br />
                    {{if eq .HttpCode 502}}
                        <b id="redirect_time">{{.WaitSecond}}</b>秒后自动<a href="javascript:window.history.back(-1);" id="redirect_toUrl">跳转</a>。
                    {{else}}
                        <b id="redirect_time">{{.WaitSecond}}</b>秒后自动<a href="{{.ToUrl}}" id="redirect_toUrl">跳转</a>。
                    {{end}}

            </div>
        </div>


    </div>
</div>

{{template "inc_footer" .}}

<script>
    $(function(){
        num = parseInt($("#redirect_time").text());
        interval=setInterval(function () {
            num--;
            $("#redirect_time").text(num);
            if(num<=0){
                clearInterval(interval);
                window.location.href=$("#redirect_toUrl").attr("href");
            }
        },1000)
    })
</script>
</body>
</html>